package im.youni.horus.core.module;

import im.youni.horus.core.http.HttpServer;

/**
 * 监控数据发现
 */
public class Discover {

    /**
     * 注册服务发现
     * @return
     */
    public static boolean registry() {
        String res = HttpServer.put(
                GlobalConfig.getInstance().getRegUrl(),
                GlobalConfig.getInstance().toRegInfo());
        System.out.println("host:" + GlobalConfig.getInstance().getRegUrl()+"|" + GlobalConfig.getInstance().toRegInfo());
        System.out.println(res);
        return true;
    }

    public static boolean check() {
        return false;
    }

    /**
     * 销毁服务发现
     */
    public static void deRegister() {
        HttpServer.put(GlobalConfig.getInstance().getDeRegUrl(), "");
    }

}
